package com.ruoyi.APPMS.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.APPMS.domain.Purchasevehicle;
import com.ruoyi.APPMS.domain.Vehicle;
import com.ruoyi.APPMS.domain.Vehiclesell;
import com.ruoyi.APPMS.mapper.VehicleMapper;
import com.ruoyi.APPMS.mapper.VehiclesellMapper;
import com.ruoyi.APPMS.service.IVehicleService;
import com.ruoyi.APPMS.service.IVehiclesellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 车辆销售Service业务层处理
 *
 * @author 吴春梅
 * @date 2023-07-03
 */
@Service
public class VehiclesellServiceImpl extends ServiceImpl<VehiclesellMapper, Vehiclesell> implements IVehiclesellService {
    @Autowired
    private VehiclesellMapper vehiclesellMapper;

    @Override
    public List<Vehiclesell> list(Vehiclesell vehiclesell) {
        return vehiclesellMapper.list(vehiclesell);
    }

    @Override
    public boolean createOrder1(Vehiclesell vehiclesell) {
        return vehiclesellMapper.createOrder1(vehiclesell)>0;
    }

    @Override
    public boolean createOrder2(Vehiclesell vehiclesell) {
        return vehiclesellMapper.createOrder2(vehiclesell)>0;
    }

    @Override
    public Vehiclesell listByid(Long vehicleid) {
        return vehiclesellMapper.listByid(vehicleid);
    }
}
